<?php
$strlangId = (isset($_POST["strLangId"]) ? $_POST["strLangId"] : "es");
require_once(BPATH_INCLUDES.'\includes.php');
$bDB = new classDB(BHOST, BUSER, BPSW, BDB);
$strQuery = "SELECT * FROM spent ORDER BY id DESC LIMIT 0, 10";
$result = $bDB->query($strQuery, MYSQL_OBJECT);
$html = '';
$i = 0;

foreach($result as $objRow) {
	$category = $bDB->getCategoryById($objRow->category_id);
	if($i % 2 == 0)
		$color = '#FFEFD5';
	else
		$color = '#EEE8AA';
	$html .= '
	<tr class="trRecord" style="background-color: '.$color.';" title="'.$objRow->description.'">
		<td>$'.$objRow->value.'</td><td>'.$category->name.'</td><td>'.$objRow->date.'</td>
	</tr>'
	;
	$i++;
}
echo $html;
?>
